package comsummer.springboot.jdbc.multiple.service;

import comsummer.springboot.jdbc.multiple.entity.Log;
import comsummer.springboot.jdbc.multiple.entity.User;
import comsummer.springboot.jdbc.multiple.repository.LogRepository;
import comsummer.springboot.jdbc.multiple.repository.UserRepository;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@AllArgsConstructor
@Service
public class LogServiceImpl implements LogService {

    private final LogRepository logRepository;

    @Override
    public void save(Log log) {
        logRepository.save(log);
    }

    @Override
    public void deleteById(Long id) {
        logRepository.deleteById(id);
    }

    @Override
    public Log getById(Long id) {
        return logRepository.getById(id);
    }

    @Override
    public List<Log> getAll() {
        return logRepository.getAll();
    }
}
